\(\int \frac {\sqrt {\cos (c+d x)} (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x))}{\sqrt {a+b \cos (c+d x)}} \, dx\) [1143]
Optimal result
Integrand size = 54, antiderivative size = 473 \[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=-\frac {(a-b) \sqrt {a+b} (4 A b+a B) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 a b d}+\frac {\sqrt {a+b} (4 A b+(a+2 b) B) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 b d}-\frac {\sqrt {a+b} \left (4 a A b-a^2 B+4 b^2 B\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 b^2 d}+\frac {(4 A b+a B) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}
\]
[Out]
1/4*(4*A*b+B*a)*sin(d*x+c)*(a+b*cos(d*x+c))^(1/2)/b/d/cos(d*x+c)^(1/2)+1/2*B*sin(d*x+c)*cos(d*x+c)^(1/2)*(a+b*
cos(d*x+c))^(1/2)/d-1/4*(a-b)*(4*A*b+B*a)*cot(d*x+c)*EllipticE((a+b*cos(d*x+c))^(1/2)/(a+b)^(1/2)/cos(d*x+c)^(
1/2),((-a-b)/(a-b))^(1/2))*(a+b)^(1/2)*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a*(1+sec(d*x+c))/(a-b))^(1/2)/a/b/d+1/4
*(4*A*b+(a+2*b)*B)*cot(d*x+c)*EllipticF((a+b*cos(d*x+c))^(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),((-a-b)/(a-b))^(1/
2))*(a+b)^(1/2)*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a*(1+sec(d*x+c))/(a-b))^(1/2)/b/d-1/4*(4*A*a*b-B*a^2+4*B*b^2)*
cot(d*x+c)*EllipticPi((a+b*cos(d*x+c))^(1/2)/(a+b)^(1/2)/cos(d*x+c)^(1/2),(a+b)/b,((-a-b)/(a-b))^(1/2))*(a+b)^
(1/2)*(a*(1-sec(d*x+c))/(a+b))^(1/2)*(a*(1+sec(d*x+c))/(a-b))^(1/2)/b^2/d
Rubi [A] (verified)
Time = 1.72 (sec) , antiderivative size = 473, normalized size of antiderivative = 1.00, number of
steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {3108, 3082, 3140, 3132, 2888,
3077, 2895, 3073} \[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=-\frac {\sqrt {a+b} \left (a^2 (-B)+4 a A b+4 b^2 B\right ) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{4 b^2 d}+\frac {\sqrt {a+b} (B (a+2 b)+4 A b) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right )}{4 b d}-\frac {(a-b) \sqrt {a+b} (a B+4 A b) \cot (c+d x) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right )}{4 a b d}+\frac {(a B+4 A b) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sin (c+d x) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}{2 d}
\]
[In]
Int[(Sqrt[Cos[c + d*x]]*(a*A + (A*b + a*B)*Cos[c + d*x] + b*B*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]],x]
[Out]
-1/4*((a - b)*Sqrt[a + b]*(4*A*b + a*B)*Cot[c + d*x]*EllipticE[ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sq
rt[Cos[c + d*x]])], -((a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a -
b)])/(a*b*d) + (Sqrt[a + b]*(4*A*b + (a + 2*b)*B)*Cot[c + d*x]*EllipticF[ArcSin[Sqrt[a + b*Cos[c + d*x]]/(Sqrt
[a + b]*Sqrt[Cos[c + d*x]])], -((a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a + b)]*Sqrt[(a*(1 + Sec[c + d*
x]))/(a - b)])/(4*b*d) - (Sqrt[a + b]*(4*a*A*b - a^2*B + 4*b^2*B)*Cot[c + d*x]*EllipticPi[(a + b)/b, ArcSin[Sq
rt[a + b*Cos[c + d*x]]/(Sqrt[a + b]*Sqrt[Cos[c + d*x]])], -((a + b)/(a - b))]*Sqrt[(a*(1 - Sec[c + d*x]))/(a +
b)]*Sqrt[(a*(1 + Sec[c + d*x]))/(a - b)])/(4*b^2*d) + ((4*A*b + a*B)*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(
4*b*d*Sqrt[Cos[c + d*x]]) + (B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d)
Rule 2888
Int[Sqrt[(b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Simp[2*b*(Tan
[e + f*x]/(d*f))*Rt[(c + d)/b, 2]*Sqrt[c*((1 + Csc[e + f*x])/(c - d))]*Sqrt[c*((1 - Csc[e + f*x])/(c + d))]*El
lipticPi[(c + d)/d, ArcSin[Sqrt[c + d*Sin[e + f*x]]/Sqrt[b*Sin[e + f*x]]/Rt[(c + d)/b, 2]], -(c + d)/(c - d)],
x] /; FreeQ[{b, c, d, e, f}, x] && NeQ[c^2 - d^2, 0] && PosQ[(c + d)/b]
Rule 2895
Int[1/(Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[-2*(
Tan[e + f*x]/(a*f))*Rt[(a + b)/d, 2]*Sqrt[a*((1 - Csc[e + f*x])/(a + b))]*Sqrt[a*((1 + Csc[e + f*x])/(a - b))]
*EllipticF[ArcSin[Sqrt[a + b*Sin[e + f*x]]/Sqrt[d*Sin[e + f*x]]/Rt[(a + b)/d, 2]], -(a + b)/(a - b)], x] /; Fr
eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && PosQ[(a + b)/d]
Rule 3073
Int[((A_) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((b_.)*sin[(e_.) + (f_.)*(x_)])^(3/2)*Sqrt[(c_) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]]), x_Symbol] :> Simp[-2*A*(c - d)*(Tan[e + f*x]/(f*b*c^2))*Rt[(c + d)/b, 2]*Sqrt[c*((1 + Csc[e +
f*x])/(c - d))]*Sqrt[c*((1 - Csc[e + f*x])/(c + d))]*EllipticE[ArcSin[Sqrt[c + d*Sin[e + f*x]]/Sqrt[b*Sin[e +
f*x]]/Rt[(c + d)/b, 2]], -(c + d)/(c - d)], x] /; FreeQ[{b, c, d, e, f, A, B}, x] && NeQ[c^2 - d^2, 0] && EqQ
[A, B] && PosQ[(c + d)/b]
Rule 3077
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(3/2)*Sqrt[(c_) + (d_.)*s
in[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist[(A - B)/(a - b), Int[1/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e
+ f*x]]), x], x] - Dist[(A*b - a*B)/(a - b), Int[(1 + Sin[e + f*x])/((a + b*Sin[e + f*x])^(3/2)*Sqrt[c + d*Sin
[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2
- d^2, 0] && NeQ[A, B]
Rule 3082
Int[Sqrt[(a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[-2*B*Cos[e + f*x]*Sqrt[a + b*Sin[e + f*x]]*((c + d*Sin[e + f*x])^n/(
f*(2*n + 3))), x] + Dist[1/(2*n + 3), Int[((c + d*Sin[e + f*x])^(n - 1)/Sqrt[a + b*Sin[e + f*x]])*Simp[a*A*c*(
2*n + 3) + B*(b*c + 2*a*d*n) + (B*(a*c + b*d)*(2*n + 1) + A*(b*c + a*d)*(2*n + 3))*Sin[e + f*x] + (A*b*d*(2*n
+ 3) + B*(a*d + 2*b*c*n))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0
] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && EqQ[n^2, 1/4]
Rule 3108
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)
*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[1/b^2, Int[(a + b*Sin[e + f*x])
^(m + 1)*(c + d*Sin[e + f*x])^n*(b*B - a*C + b*C*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
n}, x] && NeQ[b*c - a*d, 0] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Rule 3132
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2)/(((a_.) + (b_.)*sin[(e_.) + (f_.
)*(x_)])^(3/2)*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist[C/b^2, Int[Sqrt[a + b*Sin[e + f
*x]]/Sqrt[c + d*Sin[e + f*x]], x], x] + Dist[1/b^2, Int[(A*b^2 - a^2*C + b*(b*B - 2*a*C)*Sin[e + f*x])/((a + b
*Sin[e + f*x])^(3/2)*Sqrt[c + d*Sin[e + f*x]]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a
*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Rule 3140
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2)/(Sqrt[(a_.) + (b_.)*sin[(e_.) +
(f_.)*(x_)]]*Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*(Sqrt[c + d*Sin[
e + f*x]]/(d*f*Sqrt[a + b*Sin[e + f*x]])), x] + Dist[1/(2*d), Int[(1/((a + b*Sin[e + f*x])^(3/2)*Sqrt[c + d*Si
n[e + f*x]]))*Simp[2*a*A*d - C*(b*c - a*d) - 2*(a*c*C - d*(A*b + a*B))*Sin[e + f*x] + (2*b*B*d - C*(b*c + a*d)
)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0
] && NeQ[c^2 - d^2, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {\int \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \left (-a b B+b (A b+a B)+b^2 B \cos (c+d x)\right ) \, dx}{b^2} \\ & = \frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {\int \frac {a b^2 B+2 b^2 (2 a A+b B) \cos (c+d x)+b^2 (4 A b+a B) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{4 b^2} \\ & = \frac {(4 A b+a B) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {\int \frac {-a b^2 (4 A b+a B)+2 a b^3 B \cos (c+d x)+b^2 \left (4 a A b-a^2 B+4 b^2 B\right ) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{8 b^3} \\ & = \frac {(4 A b+a B) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {\int \frac {-a b^2 (4 A b+a B)+2 a b^3 B \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{8 b^3}+\frac {\left (4 a A b-a^2 B+4 b^2 B\right ) \int \frac {\sqrt {\cos (c+d x)}}{\sqrt {a+b \cos (c+d x)}} \, dx}{8 b} \\ & = -\frac {\sqrt {a+b} \left (4 a A b-a^2 B+4 b^2 B\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 b^2 d}+\frac {(4 A b+a B) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}-\frac {(a (4 A b+a B)) \int \frac {1+\cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) \sqrt {a+b \cos (c+d x)}} \, dx}{8 b}+\frac {(a (4 A b+(a+2 b) B)) \int \frac {1}{\sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}} \, dx}{8 b} \\ & = -\frac {(a-b) \sqrt {a+b} (4 A b+a B) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right )|-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 a b d}+\frac {\sqrt {a+b} (4 A b+(a+2 b) B) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 b d}-\frac {\sqrt {a+b} \left (4 a A b-a^2 B+4 b^2 B\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{b},\arcsin \left (\frac {\sqrt {a+b \cos (c+d x)}}{\sqrt {a+b} \sqrt {\cos (c+d x)}}\right ),-\frac {a+b}{a-b}\right ) \sqrt {\frac {a (1-\sec (c+d x))}{a+b}} \sqrt {\frac {a (1+\sec (c+d x))}{a-b}}}{4 b^2 d}+\frac {(4 A b+a B) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{4 b d \sqrt {\cos (c+d x)}}+\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d} \\
\end{align*}
Mathematica [C] (verified)
Result contains complex when optimal does not.
Time = 6.16 (sec) , antiderivative size = 1175, normalized size of antiderivative = 2.48
\[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\frac {B \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{2 d}+\frac {-\frac {4 a (4 A b+3 a B) \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-4 a (8 a A+4 b B) \left (\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {\sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )+2 (4 A b+a B) \left (\frac {i \cos \left (\frac {1}{2} (c+d x)\right ) \sqrt {a+b \cos (c+d x)} E\left (i \text {arcsinh}\left (\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\cos (c+d x)}}\right )|-\frac {2 a}{-a-b}\right ) \sec (c+d x)}{b \sqrt {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x)} \sqrt {\frac {(a+b \cos (c+d x)) \sec (c+d x)}{a+b}}}+\frac {2 a \left (\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{(a+b) \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}-\frac {a \sqrt {\frac {(a+b) \cot ^2\left (\frac {1}{2} (c+d x)\right )}{-a+b}} \sqrt {-\frac {(a+b) \cos (c+d x) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}} \csc (c+d x) \operatorname {EllipticPi}\left (-\frac {a}{b},\arcsin \left (\frac {\sqrt {\frac {(a+b \cos (c+d x)) \csc ^2\left (\frac {1}{2} (c+d x)\right )}{a}}}{\sqrt {2}}\right ),-\frac {2 a}{-a+b}\right ) \sin ^4\left (\frac {1}{2} (c+d x)\right )}{b \sqrt {\cos (c+d x)} \sqrt {a+b \cos (c+d x)}}\right )}{b}+\frac {\sqrt {a+b \cos (c+d x)} \sin (c+d x)}{b \sqrt {\cos (c+d x)}}\right )}{8 d}
\]
[In]
Integrate[(Sqrt[Cos[c + d*x]]*(a*A + (A*b + a*B)*Cos[c + d*x] + b*B*Cos[c + d*x]^2))/Sqrt[a + b*Cos[c + d*x]],
x]
[Out]
(B*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(2*d) + ((-4*a*(4*A*b + 3*a*B)*Sqrt[((a + b)*Cot[
(c + d*x)/2]^2)/(-a + b)]*Sqrt[-(((a + b)*Cos[c + d*x]*Csc[(c + d*x)/2]^2)/a)]*Sqrt[((a + b*Cos[c + d*x])*Csc[
(c + d*x)/2]^2)/a]*Csc[c + d*x]*EllipticF[ArcSin[Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]/Sqrt[2]], (
-2*a)/(-a + b)]*Sin[(c + d*x)/2]^4)/((a + b)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) - 4*a*(8*a*A + 4*b*B
)*((Sqrt[((a + b)*Cot[(c + d*x)/2]^2)/(-a + b)]*Sqrt[-(((a + b)*Cos[c + d*x]*Csc[(c + d*x)/2]^2)/a)]*Sqrt[((a
+ b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]*Csc[c + d*x]*EllipticF[ArcSin[Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x
)/2]^2)/a]/Sqrt[2]], (-2*a)/(-a + b)]*Sin[(c + d*x)/2]^4)/((a + b)*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]
) - (Sqrt[((a + b)*Cot[(c + d*x)/2]^2)/(-a + b)]*Sqrt[-(((a + b)*Cos[c + d*x]*Csc[(c + d*x)/2]^2)/a)]*Sqrt[((a
+ b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]*Csc[c + d*x]*EllipticPi[-(a/b), ArcSin[Sqrt[((a + b*Cos[c + d*x])*Cs
c[(c + d*x)/2]^2)/a]/Sqrt[2]], (-2*a)/(-a + b)]*Sin[(c + d*x)/2]^4)/(b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d
*x]])) + 2*(4*A*b + a*B)*((I*Cos[(c + d*x)/2]*Sqrt[a + b*Cos[c + d*x]]*EllipticE[I*ArcSinh[Sin[(c + d*x)/2]/Sq
rt[Cos[c + d*x]]], (-2*a)/(-a - b)]*Sec[c + d*x])/(b*Sqrt[Cos[(c + d*x)/2]^2*Sec[c + d*x]]*Sqrt[((a + b*Cos[c
+ d*x])*Sec[c + d*x])/(a + b)]) + (2*a*((a*Sqrt[((a + b)*Cot[(c + d*x)/2]^2)/(-a + b)]*Sqrt[-(((a + b)*Cos[c +
d*x]*Csc[(c + d*x)/2]^2)/a)]*Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]*Csc[c + d*x]*EllipticF[ArcSin[
Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]/Sqrt[2]], (-2*a)/(-a + b)]*Sin[(c + d*x)/2]^4)/((a + b)*Sqrt
[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]]) - (a*Sqrt[((a + b)*Cot[(c + d*x)/2]^2)/(-a + b)]*Sqrt[-(((a + b)*Cos[
c + d*x]*Csc[(c + d*x)/2]^2)/a)]*Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]*Csc[c + d*x]*EllipticPi[-(a
/b), ArcSin[Sqrt[((a + b*Cos[c + d*x])*Csc[(c + d*x)/2]^2)/a]/Sqrt[2]], (-2*a)/(-a + b)]*Sin[(c + d*x)/2]^4)/(
b*Sqrt[Cos[c + d*x]]*Sqrt[a + b*Cos[c + d*x]])))/b + (Sqrt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(b*Sqrt[Cos[c + d
*x]])))/(8*d)
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(2674\) vs. \(2(431)=862\).
Time = 8.38 (sec) , antiderivative size = 2675, normalized size of antiderivative =
5.66
| | |
method | result | size |
| | |
parts |
\(\text {Expression too large to display}\) |
\(2675\) |
default |
\(\text {Expression too large to display}\) |
\(2794\) |
| | |
|
|
|
[In]
int((a*A+(A*b+B*a)*cos(d*x+c)+b*B*cos(d*x+c)^2)*cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x,method=_RETURNVERBOS
E)
[Out]
-(A*b+B*a)/d/b*((cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(co
t(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a*cos(d*x+c)^2+(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d
*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*b*cos(d*x+c)^2-2*(cos(d*x+c
)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-
(a-b)/(a+b))^(1/2))*a*cos(d*x+c)^2+2*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)
))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a*cos(d*x+c)+2*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2
)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*b*cos(
d*x+c)-4*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticPi(cot(d*x+
c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2))*a*cos(d*x+c)+(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c)
)/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a+(cos(d*x+c)/(1+cos(d*x+c)))^(1
/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*b-2*
(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*
x+c),-1,(-(a-b)/(a+b))^(1/2))*a-b*cos(d*x+c)^2*sin(d*x+c)-a*cos(d*x+c)*sin(d*x+c))/(1+cos(d*x+c))/(a+b*cos(d*x
+c))^(1/2)/cos(d*x+c)^(1/2)+2*a*A/d*(EllipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))-2*EllipticPi(cot(d*
x+c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2)))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d
*x+c)))^(1/2)/(a+b*cos(d*x+c))^(1/2)*(1+cos(d*x+c))/cos(d*x+c)^(1/2)-1/4*B/b/d*(2*(cos(d*x+c)/(1+cos(d*x+c)))^
(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a*
b*cos(d*x+c)^2-4*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticF(c
ot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*b^2*cos(d*x+c)^2-3*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*
cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a^2*cos(d*x+c)^2-3*(co
s(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c)
,(-(a-b)/(a+b))^(1/2))*a*b*cos(d*x+c)^2+6*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d
*x+c)))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2))*a^2*cos(d*x+c)^2+8*(cos(d*x+c)/(1+cos(
d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(a+
b))^(1/2))*b^2*cos(d*x+c)^2+4*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2
)*EllipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a*b*cos(d*x+c)-8*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/
(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*b^2*cos(d*x
+c)-6*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-c
sc(d*x+c),(-(a-b)/(a+b))^(1/2))*a^2*cos(d*x+c)-6*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(
1+cos(d*x+c)))^(1/2)*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*a*b*cos(d*x+c)+12*(cos(d*x+c)/(1+co
s(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(
a+b))^(1/2))*a^2*cos(d*x+c)+16*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/
2)*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2))*b^2*cos(d*x+c)-2*b^2*cos(d*x+c)^3*sin(d*x+c)+2*El
lipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c)
)/(1+cos(d*x+c)))^(1/2)*a*b-4*EllipticF(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*(cos(d*x+c)/(1+cos(d*x+c))
)^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*b^2-3*EllipticE(cot(d*x+c)-csc(d*x+c),(-(a-b)/(a+b))^(
1/2))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*a^2-3*EllipticE(cot(d*
x+c)-csc(d*x+c),(-(a-b)/(a+b))^(1/2))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c
)))^(1/2)*a*b+6*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1
/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*a^2+8*EllipticPi(cot(d*x+c)-csc(d*x+c),-1,(-(a-b)/(a+b))^(1/2))*
(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*(1/(a+b)*(a+b*cos(d*x+c))/(1+cos(d*x+c)))^(1/2)*b^2+a*b*cos(d*x+c)^2*sin(d*x
+c)-2*b^2*cos(d*x+c)^2*sin(d*x+c)+3*a^2*cos(d*x+c)*sin(d*x+c)-2*a*b*cos(d*x+c)*sin(d*x+c))/(1+cos(d*x+c))/(a+b
*cos(d*x+c))^(1/2)/cos(d*x+c)^(1/2)
Fricas [F]
\[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\int { \frac {{\left (B b \cos \left (d x + c\right )^{2} + A a + {\left (B a + A b\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )}}{\sqrt {b \cos \left (d x + c\right ) + a}} \,d x }
\]
[In]
integrate((a*A+(A*b+B*a)*cos(d*x+c)+b*B*cos(d*x+c)^2)*cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="fr
icas")
[Out]
integral((B*cos(d*x + c) + A)*sqrt(b*cos(d*x + c) + a)*sqrt(cos(d*x + c)), x)
Sympy [F(-1)]
Timed out. \[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\text {Timed out}
\]
[In]
integrate((a*A+(A*b+B*a)*cos(d*x+c)+b*B*cos(d*x+c)**2)*cos(d*x+c)**(1/2)/(a+b*cos(d*x+c))**(1/2),x)
[Out]
Timed out
Maxima [F]
\[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\int { \frac {{\left (B b \cos \left (d x + c\right )^{2} + A a + {\left (B a + A b\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )}}{\sqrt {b \cos \left (d x + c\right ) + a}} \,d x }
\]
[In]
integrate((a*A+(A*b+B*a)*cos(d*x+c)+b*B*cos(d*x+c)^2)*cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="ma
xima")
[Out]
integrate((B*b*cos(d*x + c)^2 + A*a + (B*a + A*b)*cos(d*x + c))*sqrt(cos(d*x + c))/sqrt(b*cos(d*x + c) + a), x
)
Giac [F]
\[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\int { \frac {{\left (B b \cos \left (d x + c\right )^{2} + A a + {\left (B a + A b\right )} \cos \left (d x + c\right )\right )} \sqrt {\cos \left (d x + c\right )}}{\sqrt {b \cos \left (d x + c\right ) + a}} \,d x }
\]
[In]
integrate((a*A+(A*b+B*a)*cos(d*x+c)+b*B*cos(d*x+c)^2)*cos(d*x+c)^(1/2)/(a+b*cos(d*x+c))^(1/2),x, algorithm="gi
ac")
[Out]
integrate((B*b*cos(d*x + c)^2 + A*a + (B*a + A*b)*cos(d*x + c))*sqrt(cos(d*x + c))/sqrt(b*cos(d*x + c) + a), x
)
Mupad [F(-1)]
Timed out. \[
\int \frac {\sqrt {\cos (c+d x)} \left (a A+(A b+a B) \cos (c+d x)+b B \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx=\int \frac {\sqrt {\cos \left (c+d\,x\right )}\,\left (B\,b\,{\cos \left (c+d\,x\right )}^2+\left (A\,b+B\,a\right )\,\cos \left (c+d\,x\right )+A\,a\right )}{\sqrt {a+b\,\cos \left (c+d\,x\right )}} \,d x
\]
[In]
int((cos(c + d*x)^(1/2)*(A*a + cos(c + d*x)*(A*b + B*a) + B*b*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(1/2),x)
[Out]
int((cos(c + d*x)^(1/2)*(A*a + cos(c + d*x)*(A*b + B*a) + B*b*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(1/2), x)